home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM BV3 / BMUG PD-ROM Version BV3 (CDRM1097900).iso / Programming / Programming Languages / Pocket Forth 6 / Source / DICTResource.asm < prev    next >
Encoding:
Assembly Source File  |  1992-05-18  |  1.5 KB  |  56 lines  |  [TEXT/ASM ]

  1. ; pForthDict.asm
  2. ; Pocket Forth version of Flint  7:48:10 PM  1/12/87
  3. ; put into "DICT" resource 1:27:38 PM  1/23/87
  4. ; change DP to Dict and CP to DP 4:48:49 PM  1/24/87
  5. ; add optional base expansion 11:33:21 PM  2/3/87
  6. ; restructure 8:22:09 AM  2/11/87
  7. ; version 0.3  12:53:54 PM  1/21/88
  8. ; Fri Apr 29, 1988 10:17:36 v 0.4
  9. ; 11:55:00 PM 6/3/91 restructure preamble
  10. ; Thu Apr 02, 1992 12:00:00 grow return
  11.  
  12. WHeight    EQU    178
  13. WWidth    EQU    384
  14. CR    EQU    $0D
  15. BS    EQU    8
  16. BL    EQU    32
  17.  
  18. MACRO    Counter =    D7 |        ; Character count
  19. MACRO    Dict =    D6 |            ; _DICT_ionary last word (rel.addr)
  20. MACRO    RS =    A7 |            ; _R_eturn (and system) _S_tack
  21. MACRO    PS =    A6 |            ; _P_arameter _S_tack
  22. MACRO    IS =    A4 |            ; _I_nput _S_tream
  23. MACRO    BP =    A3 |            ; _B_ase _P_ointer
  24. MACRO    DP =    A2 |            ; _D_ictionary _P_ointer
  25.  
  26. MACRO    Base =    Bottom |        ; address of the bottom address
  27. MACRO    theLink =  Base-6 |        ; dictionary search link address
  28.  
  29. INCLUDE    Traps.txt
  30. INCLUDE    Macros.txt
  31.  
  32. .ALIGN 2     ;     TYPE    ID#   Title   attribute: locked
  33. RESOURCE    'DICT'    257  'Pocket'    16
  34.  
  35. ; ----- start of code ------
  36.  
  37. Bottom:    JMP    Cold            ; first time run
  38. GRet:    LEA    Bottom,BP        ; reset the base pointer
  39.       LEA    0(BP,D1.W),DP        ; abs.addr into register
  40.     LEA    0(BP,D2.W),IS
  41.     JSR    toabs-base(BP)
  42.     MOVE.L    (PS)+,(RS)
  43.     RTS
  44.  
  45.  
  46. INCLUDE    Interface.txt            ; the interface
  47. INCLUDE Interpreter.txt            ; the interpreter
  48. INCLUDE    Dictionary.txt            ; the dictionary
  49.  
  50.     DC.B    4,'TAS'            ; "task" ( -- ) a no-op word
  51.     DC.W    qbutton-theLink        ;  use:  forget task : task ;
  52. Task:    RTS                ;  to cleanup dictionary
  53. DictEnd:
  54.  
  55. END
  56.